]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Fix the amount of fitting elements calculation in the OverflowList
authorSiegfried-Angel Gevatter Pujals <rainct@ubuntu.com>
Sun, 2 Aug 2009 18:06:32 +0000 (20:06 +0200)
committerSiegfried-Angel Gevatter Pujals <rainct@ubuntu.com>
Sun, 2 Aug 2009 18:06:32 +0000 (20:06 +0200)
Before this in certain conditions (depending on the available
height) two items could be drawn in the same position. Bug #590278.

src/shell-overflow-list.c

index 8565a33c0a337ee72bc5ee361f689abb111bfbcf..77da1ad669c7b69aafc3ef8f9180a2ae709cabba 100644 (file)
@@ -147,6 +147,9 @@ shell_overflow_list_allocate (ClutterActor           *actor,
       ClutterActor *actor = CLUTTER_ACTOR (iter->data);
       ClutterActorBox child_box;
 
+      if (iter != children)
+        curheight += priv->spacing;
+
       if ((curheight + priv->item_height) > avail_height)
         {
           overflow = TRUE;
@@ -163,8 +166,6 @@ shell_overflow_list_allocate (ClutterActor           *actor,
       clutter_actor_allocate (actor, &child_box, flags);
 
       curheight += priv->item_height;
-      if (iter != children)
-        curheight += priv->spacing;
     }
 
   priv->items_per_page = n_fits;